package com.scorpio.user.service.impl;

import com.scorpio.user.entity.User;
import com.scorpio.user.mapper.UserMapper;
import com.scorpio.user.service.IUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 用户表 服务实现类
 * </p>
 *
 * @author autoCode
 * @since 2020-01-13
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IUserService {

    @Override
    public List<User> getAll() {
        return list();
    }

    @Override
    public List<User> addUsers(List<User> users) {
        saveOrUpdateBatch(users);
        return users;
    }
}
